/**
 * Copyright (C) 2014-2015 5WeHealth Technologies. All rights reserved.
 *
 * @author: Jingtao Yun Dec 3, 2014
 */
package com.wehealth.electrocardiograph_two_client;

import android.app.Application;
import android.content.Context;


import com.alibaba.android.arouter.launcher.ARouter;
import com.wehealth.three.lib_common.manager.CrashManager;
import com.wehealth.three.lib_connect.utils.PreferenceUtils;

/**
 *
 */
public class ClientApp extends Application {

    public static Context applicationContext;
    private static ClientApp instance;

    @Override
    public void onCreate() {
        super.onCreate();
        applicationContext = this;
        instance = this;
        init();
    }

    private void init() {
//        CrashManager crashHandler = CrashManager.getInstance();
//        crashHandler.init(instance);
        if ( BuildConfig.DEBUG) {
            // 阿里巴巴的路由导航框架的初始化
            ARouter.openLog();
            ARouter.openDebug();
        }
        ARouter.init(this);
        PreferenceUtils.init(this);
    }

    public static ClientApp getInstance() {
        return instance;
    }


}